import Vue from "vue";
import Vuex from "vuex";
import home from "./home";
import editor from "./editor";
import preview from "./preview";
import monitor from "./monitor";

Vue.use(Vuex);

let modules = {};
modules.home = home;
modules.editor = editor;
modules.monitor = monitor;
modules.preview = preview;

const store = new Vuex.Store({
  state: {
    ai: false
  },
  mutations: {
    handleAI(state, payload) {
      state.ai = payload
  },
  },
  modules,
  namespaced: true,
  plugins: []
});

export default store;
